const routes = [
  {
    path: '/',
    name: 'Layout',
    redirect: '/home',
    component: () => import('@/layout/index.vue'),
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          icon: "", // 路由图标
          title: '首页',  // 路由标题
          isSignIn: true, // 是否登录权限
          isShowMenu: true, // 是否显示在 菜单栏上
          role: ['admin'], // 可访问角色
          link: '/home',
        }
      },
      {
        path: '/table-template',
        name: 'TableTemplate',
        component: () => import('@/views/table-template/index.vue'),
        meta: {
          icon: "", // 路由图标
          title: '表格模板',
          isSignIn: true,
          isShowMenu: true, 
          role: ['admin'],
          link: '/table-template',
          
        }
      }
    ]
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/login.vue'),
    meta: {
      title: '登录注册',
      isSignIn: false, // 是否登录权限
      link: '/login',
      role: ['admin'], // 可访问角色
    }
  },
  {
    path: '/error',
    name: 'Error',
    component: () => import('@/views/404.vue'),
    meta: {
      isSignIn: false
    }
  },
  {
    path: '*',
    redirect: '/error',
    meta: {
      isSignIn: false,
    }
  },
]

export default routes
